#include "GameScheduler.h"

PhysicsScheduler::PhysicsScheduler()
{

}

PhysicsScheduler::~PhysicsScheduler()
{

}

bool PhysicsScheduler::initWith( b2World* world )
{
    mWorld = world;
    return true;
}

void PhysicsScheduler::update( float dt )
{
    mWorld->Step(dt, 6, 2);
    mWorld->ClearForces();
}

void PhysicsScheduler::start()
{
    CCDirector::sharedDirector()->getScheduler()->scheduleUpdateForTarget(this, 0, false);
}
